package com.server.http.handler.impl;

import com.server.conditionenum.HttpReturnStatus;
import com.server.db.DataBaseManager;
import com.server.http.handler.HttpHandler;
import com.server.http.request.HttpRequestMessage;
import com.server.http.response.HttpResponseMessage;
import com.server.mine.net.HttpProtocol;

/**
 * @author 李小布
 * @date 2018年4月21日 下午4:05:11
 * @version 1.0
*/
public class GetAccountList extends HttpHandler{

	@Override
	public void handle(HttpRequestMessage request, HttpResponseMessage response) {
		
		String json = DataBaseManager.GetInstance().GetAccountList();
		
		if(json != null) {
			SetReturnData(response,json,HttpProtocol.GETACCOUNTLIST,HttpReturnStatus.Successed);
		}else {
			SetReturnData(response,"获取管理员列表失败!",HttpProtocol.GETACCOUNTLIST,HttpReturnStatus.Successed);
		}
	}
}